login.html
<div style="padding: 10px">{{ message }}</div>
<form action="/login/{%if next%}?next={{ next }}{%endif%}" method="POST">
{{ form.as_p }}
<input type="submit" value="Submit" />
{% if logged_in %}
<a href="/logout/">Log out</a>
{% else %}
<a href="/accounts/register/">Register</a>
{% endif %}
</form>
